package com.example.designpatterns.mediator;

/**
 * 具体同事类
 * 实现具体的消息接收行为
 */
public class ConcreteColleague extends Colleague {

    /**
     * 构造函数
     * @param mediator 中介者
     * @param name 名称
     */
    public ConcreteColleague(Mediator mediator, String name) {
        super(mediator, name);
    }

    @Override
    public void receive(String message) {
        System.out.println(name + " 收到消息: " + message);
    }
}